<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html lang="en-US">
<head>
<title><s:if test="%{#request.TitleName != null}">
		${requestScope["TitleName"]} - Admin - PhoneShop
	</s:if> <s:else>
		<tiles:insertAttribute name="title" />
	</s:else></title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="<s:url value="css/admin/style.css" />" />
<script type="text/javascript" src="<s:url value="css/admin/jquery.min.js"/>"></script>
<script type="text/javascript" src="<s:url value="css/admin/ddaccordion.js" />"></script>
<script type="text/javascript">
ddaccordion.init({
	headerclass: "submenuheader", //Shared CSS class name of headers group
	contentclass: "submenu", //Shared CSS class name of contents group
	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
	mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
	defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
	animatedefault: false, //Should contents open by default be animated into view?
	persiststate: true, //persist state of opened contents within browser session?
	toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
	togglehtml: ["suffix", "<img src="<s:url value="css/admin/images/plus.gif" />" class='statusicon' />", "<img src="<s:url value="css/admin/images/minus.gif" />" class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
	animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
	oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
		//do nothing
	},
	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
		//do nothing
	}
})
</script>
<script type="text/javascript" src="<s:url value="css/admin/jconfirmaction.jquery.js" />"></script>
<script type="text/javascript">
	/* 
	$(document).ready(function() {
		$('.ask').jConfirmAction();
	}); */
	function confirmDelete(action){
		var retVal = confirm("Do you want to delete this?");
		   if( retVal == true ){
			   	var url = window.location.host  + window.location.pathname;
				url = window.location.protocol + "//" + url.substring(0, url.lastIndexOf("/")) + action;
				//alert(url);
		        document.location = url;
			  	return true;
		   }else{
		      
			  return false;
		   }
	}

</script>
<script language="javascript" type="text/javascript" src="<s:url value="css/admin/niceforms.js" /> "></script>
<link rel="stylesheet" type="text/css" media="all" href="<s:url value="css/admin/niceforms-default.css" /> " />
</head>
<body>
	<div id="main_container">
		<div class="header">
			<div class="logo">
				<a href="<s:url value="index" namespace="/admin"></s:url>"><img src="<s:url value="css/admin/images/logo.gif" />" alt="" title=""
					border="0" /></a>
			</div>
			<div class="right_header">
				Welcome Admin, <a href="<s:url value="/index" namespace="/" />">Visit site</a> | <a href="<s:url value="/j_spring_security_logout" />" class="logout">Logout</a>
			</div>
			<div id="clock_a"></div>
		</div>
		<div class="main_content">
			<div class="menu">
				<ul>
					<li>
						<a href="">Manage Users</a>
						<ul>
							<li><a href="<s:url value="userlist" namespace="/admin"><s:param name="action">view</s:param></s:url>" title="">View all users</a></li>
							<li><a href="<s:url value="userlist" namespace="/admin"><s:param name="action">new</s:param></s:url>" title="">Create new users</a></li>

						</ul>
					</li>
					<li>
						<a href="">Manage Products</a>
						<ul>
							<li><a href="<s:url value="productlist" namespace="/admin"><s:param name="action">view</s:param></s:url>" title="">View all Product</a></li>
							<li><a href="<s:url value="productlist" namespace="/admin"><s:param name="action">new</s:param></s:url>" title="">Create new products</a></li>
						</ul> 
					</li>
					<li><a href="">Manage Promotions</a>
						<ul>
							<li><a href="<s:url value="promotionlist" namespace="/admin"><s:param name="action">view</s:param></s:url>" title="">View all Promotions</a></li>
							<li><a href="<s:url value="promotionlist" namespace="/admin"><s:param name="action">new</s:param></s:url>" title="">Create new promotions</a></li>
						</ul> 
					</li>
					<li><a href="">Mange Orders</a>
						<ul>
							<li><a href="<s:url value="orderlist" namespace="/admin"><s:param name="action">view</s:param></s:url>" title="">View all orders</a></li>
						</ul>
					</li>
				</ul>
			</div>
			
			<div class="center_content">
				<tiles:insertAttribute name="content" />
			</div>
			<div class="clear"></div>
		</div>
		<!--end of main content-->

		<div class="footer">
			<div class="left_footer"> IN ADMIN PANEL | Powered by <a href="http://indeziner.com">INDEZINER</a> </div>
			<div class="right_footer"> <a href="http://indeziner.com">
				<img src="<s:url value="css/admin/images/indeziner_logo.gif" /> " alt="" title="" border="0" /></a>
			</div>
		</div>
	</div>
</body>
</html>